#include<bits/stdc++.h>
using namespace std;
int a[100010];
int k,s;
bool cmp1(int x,int y)
{
    return x<y;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    s=n;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
   sort(a,a+n,cmp1);
   for(int i=0;i<n;i++)
    {
        if(a[i]>a[0])
        {
            k=i;
            break;
        }
    }
    for(int i=0;i<k;i++)
    {
        if(a[k]>a[i])
        {
            s--;
            k++;
        }
        else
        {
            while(k<n)
            {
                k++;
                if(a[k]>a[i])
                {
                    break;
                }
            }
        }
    }
   cout<<s<<endl;
   return 0;
}
